package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author spt
 * @description 预约设置DAO
 * @date 2019/9/29
 **/
@Mapper
public interface OrderSettingDao {


    List<OrderSetting> selectordersetting(@Param("fisrtDayOfMonth") String fisrtDayOfMonth, @Param("lastDayOfMonth") String lastDayOfMonth);


    OrderSetting getordersetting(OrderSetting orderSetting);

    void updatenumber(@Param("orderSetting") OrderSetting orderSetting, @Param("id") Integer id);

    void insertordersetting(OrderSetting orderSetting);

    /**
     * 根据时间查询
     * @param orderDate
     * @return
     */
    OrderSetting selectByOrderDate(Date orderDate);

    /**
     * 根据id更新已预约人数
     * @param id
     * @param i
     */
    void updateReservationsById(@Param("id") Integer id, @Param("reservations") int i);
}
